package com.zy.yun.core.config;

import com.zy.yun.core.interceptor.CrossInterceptor;
import com.zy.yun.core.interceptor.NotNullInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Auther: wangyanwei
 * @Date: 2019/9/20 16:02
 * @Description: 拦截器，过滤器等配置中心
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new CrossInterceptor());
        registry.addInterceptor(new NotNullInterceptor());

    }
}
